# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer:
pkgname=gedit-plugins
pkgver=44.1
pkgrel=3
pkgdesc="Plugins for gedit, the GNOME text editor"
url="https://gitlab.gnome.org/GNOME/gedit/blob/master/plugins/list-of-gedit-plugins.md"
arch="all !s390x"
license="GPL-2.0-only"
depends="python3 py3-gobject3 vte3 gucharmap py3-dbus libpeas-python3"
makedepends="glib-dev gtk+3.0-dev gtksourceview4-dev libpeas-dev gedit-dev vala
	libgit2-glib-dev itstool vte3-dev gucharmap-dev py3-dbus-dev meson"
checkdepends="appstream-glib"
subpackages="$pkgname-lang $pkgname-doc $pkgname-pyc"
source="https://download.gnome.org/sources/gedit-plugins/${pkgver%.*}/gedit-plugins-$pkgver.tar.xz"

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
	python3 -m compileall -fq "$pkgdir"/usr/lib/gedit
}

pyc() {
	default_pyc
	local IFS=$'\n'
	amove $(find usr/lib/gedit/plugins -type d -name __pycache__)
}

sha512sums="
d5d767210b362747e4ba51b61b4d1c58bf5b37aa5f942cb9654f71c534d8bce2594ebc9004bed686627403fe1c3a6af84a45f4ce72af1f27fa7b644d11cdc9e2  gedit-plugins-44.1.tar.xz
"
